package com.fz.us.oa.core.dao.com.impl;

import com.fz.us.admin.base.dao.impl.BaseDaoImpl;
import com.fz.us.admin.company.entity.User;
import com.fz.us.oa.core.dao.com.CommonModelDao;
import com.fz.us.oa.core.entity.com.CommonModel;
import org.springframework.stereotype.Repository;


/**
 * Created by ZhuChunXiao on 2017/7/21.
 */
@Repository
public class CommonModelDaoImpl extends BaseDaoImpl<CommonModel, String> implements CommonModelDao {

    @Override
    public int delCommonModel(User user) {
        return getSession().createQuery("delete from CommonModel c where c.user = :user").setParameter("user" ,user).executeUpdate();
    }
}
